home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 33
/
64er_Magazin_Sonderheft_33_19xx_Markt__Technik_de_Side_B.d64
/
gleichungen ii
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
256b
|
15 lines
10 deffna(x)=x*x*x-2*x*x+7
20 deffnb(x)=x*x+7*x
30 ge=5:rem genauigkeit
40 de=0.5/10^ge
50 input"startwert";xa
60 x=xa
70 fa=fna(x)-fnb(x)
80 x=xa+0.1
90 f=fna(x)-fnb(x)
100 xn=x-(xa-x)*f/(fa-f)
110 d=abs((x-xn)/(xn+de))
120 ifd<dethen140
130 x=xn:goto90
140 print"x=";xn